import wtforms

from validators import BaseForm, BasePageForm


class DictItemForm(BaseForm):
    """
    字典项表单校验类
    """
    id = wtforms.IntegerField()
    dictId = wtforms.StringField("字典ID", [wtforms.validators.DataRequired(message="字典ID不能为空")])
    name = wtforms.StringField("字典项名称", [wtforms.validators.DataRequired(message="字典项名称不能为空")])
    code = wtforms.StringField("唯一编码", [wtforms.validators.DataRequired(message="唯一编码不能为空")])
    sort = wtforms.StringField("排序")
    enabled = wtforms.StringField("是否启用")
    remark = wtforms.StringField("备注")
    createUser = wtforms.StringField("创建用户")
    updateUser = wtforms.StringField("更新用户")


class DictItemPageForm(BasePageForm):
    """
    字典项分页校验类
    """
    pass
